package com.txts.road.admin.vehicleSys.service.impl;

import com.txts.road.admin.vehicleSys.domain.liveVehicle;
import com.txts.road.admin.vehicleSys.mapper.liveVehicleMapper;
import com.txts.road.admin.vehicleSys.service.IliveVehicleService;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 生活车辆Service业务层处理
 *
 * @author ruoyi
 * @date 2025-05-19
 */
@Service
public class liveVehicleServiceImpl implements IliveVehicleService {
    @Resource
    private liveVehicleMapper liveVehicleMapper;

    /**
     * 查询生活车辆
     *
     * @param id 生活车辆主键
     * @return 生活车辆
     */
    @Override
    public liveVehicle selectliveVehicleById(Long id) {
        return liveVehicleMapper.selectliveVehicleById(id);
    }

    /**
     * 查询生活车辆列表
     *
     * @param liveVehicle 生活车辆
     * @return 生活车辆
     */
    @Override
    public List<liveVehicle> selectliveVehicleList(liveVehicle liveVehicle) {
        return liveVehicleMapper.selectliveVehicleList(liveVehicle);
    }

    /**
     * 新增生活车辆
     *
     * @param liveVehicle 生活车辆
     * @return 结果
     */
    @Override
    public int insertliveVehicle(liveVehicle liveVehicle) {
        return liveVehicleMapper.insertliveVehicle(liveVehicle);
    }

    /**
     * 修改生活车辆
     *
     * @param liveVehicle 生活车辆
     * @return 结果
     */
    @Override
    public int updateliveVehicle(liveVehicle liveVehicle) {
        return liveVehicleMapper.updateliveVehicle(liveVehicle);
    }

    /**
     * 批量删除生活车辆
     *
     * @param ids 需要删除的生活车辆主键
     * @return 结果
     */
    @Override
    public int deleteliveVehicleByIds(Long[] ids) {
        return liveVehicleMapper.deleteliveVehicleByIds(ids);
    }

    /**
     * 删除生活车辆信息
     *
     * @param id 生活车辆主键
     * @return 结果
     */
    @Override
    public int deleteliveVehicleById(Long id) {
        return liveVehicleMapper.deleteliveVehicleById(id);
    }


    @Override
    public List<String> selectAllcheshou() {
        return liveVehicleMapper.selectAllaishi();
    }
}
